package cn.edu.nsmc.modules.sys.entity;

import cn.edu.nsmc.common.validator.group.AddGroup;
import cn.edu.nsmc.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @Author ZY
 * @Date 2024/2/20 18:59
 */
@Data
@TableName("sys_user")
public class SysVisitorEntity {
    @TableId
    private Long userId;
    @NotBlank(message="用户名不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String username;
    @NotBlank(message="密码不能为空", groups = AddGroup.class)
    private String password;
    private String salt;
    @NotBlank(message="邮箱不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Email(message="邮箱格式不正确", groups = {AddGroup.class, UpdateGroup.class})
    private String email;
    private String mobile;
    private Long status;
    private Long createUserId;
    private Date createTime;
    private String name;
    private Long type;
    private Long miniUse;
    private Long miniAttention;
    private String memo;
    private Long departmentId;
    private Long personalNumber;
}
